package com.example.demo.web;

import com.example.demo.pojo.GridCity;
import com.example.demo.service.IGridCityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/gridCity")
@CrossOrigin("*")
public class GridCityWeb {

    @Autowired
    private IGridCityService gridCityService;

    // 根据省ID查询市信息
    @RequestMapping("/listGridCityByProvinceId")
    public List<GridCity> listGridCityByProvinceId(@RequestParam Integer provinceId) {
        return gridCityService.listGridCityByProvinceId(provinceId);
    }
}
